Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.hadoop.balancer.examples.invindx
Class InvertedIndex.InvertedIndexKey

`java.lang.Object
oracle.hadoop.balancer.examples.invindx.InvertedIndex.InvertedIndexKey`

All Implemented Interfaces:
  org.apache.hadoop.io.Writable

Enclosing class:
  InvertedIndex

      public static class InvertedIndex.InvertedIndexKey

extends java.lang.Object
implements org.apache.hadoop.io.Writable

Key class for the inverted index application. Since we want Hadoop to do a secondary-sort (produce a sorted list of reduce-values per key), we have a composite key class that contains both key and value elements.

- Sorting comparator is via `#compareTo(InvertedIndexKey)`
- Grouping comparator is `InvertedIndexKey.WordComparator`
- Partitioner is `InvertedIndex.InvertedIndexKey.WordPartitioner`

Nested Class Summary
`static class` | `InvertedIndex.InvertedIndexKey.GroupingComparator` This comparator compares only the key component of this class (the word).
`static class` | `InvertedIndex.InvertedIndexKey.SortingComparator`
`static class` | `InvertedIndex.InvertedIndexKey.WordPartitioner<V>` Partition on the word's hashcode.

Constructor Summary
`InvertedIndex.InvertedIndexKey()`

Method Summary
`int` | `hashCode()`
`void` | `readFields(java.io.DataInput in)`
`java.lang.String` | `toString()` TextOutputFormat calls this to print the key
`void` | `write(java.io.DataOutput out)`

Methods inherited from class java.lang.Object
`equals, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### InvertedIndex.InvertedIndexKey

    public InvertedIndex.InvertedIndexKey()

Method Detail

### toString

    public java.lang.String toString()

  TextOutputFormat calls this to print the key
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the word for this key

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### readFields

    public void readFields(java.io.DataInput in)
                    throws java.io.IOException

  Specified by:
    `readFields` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `java.io.IOException`

### write

    public void write(java.io.DataOutput out)
               throws java.io.IOException

  Specified by:
    `write` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `java.io.IOException`

Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.